<!DOCTYPE html>
<html>

<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>提现账户</title>
	<link rel="stylesheet" href="css/amazeui.min.css" />
	<link rel="stylesheet" href="css/app.css" />
	<link rel="stylesheet" href="css/swiper-3.3.1.min.css" />
	<script src="assets/js/jquery.min.js" type="text/javascript"></script>
	<script src="js/amazeui.min.js" type="text/javascript"></script>

	<style>
		body {
			max-width: 640px;
			margin: 0 auto;
			font-size: 10px;
			background: #F2F3F8;
		}

		* {
			box-sizing: border-box;
		}

		[class*=am-u-] {
			padding: 0;
		}
	</style>
</head>

<body>
	<!--头部-->
	<header class="am-u">
		<div class="am-u-sm-12 head_nav" style="margin:0;">
			<div class="am-u-sm-2 am-vertical-align" style="text-align: center;">
				<a href="Rname.html">
					<img src="img/return@2x.png" class="am-vertical-align-middle" alt="" />
				</a>
			</div>
			<div class="am-u-sm-8 head_text">
				提现账户
			</div>
			<div class="am-u-sm-2">

			</div>
		</div>
	</header>
	<div style="clear: both;"></div>
	<div style="padding: 10px;">
		<div style="background: #0165CA;height:100px;border-radius: 6px;">
			<div style="padding: 10px 0 5px 15px;">
				<img src="img/card@2x.png" width="45" alt="bankLoge" class="bank_logo" />
				<span id="bankName" style="font-size:16px;color:#Fff;"></span>
			</div>
			<p id="accountNo" style="font-size: 15px;text-align: right;padding-right: 15px;color: #fff;margin: 0;"></p>
		</div>
	</div>
	<div style="text-align: center;margin-top: 10px;">
		<button type="button" onclick="window.location.href='rebind.html'" class="am-btn" style="background: #0165CA;	;color: #fff;border-radius: 6px;padding: 10px 30px 10px 30px;">换绑</button>
	</div>
	<script src="js/jquery-1.11.3.js"></script>
	<script src="js/loading.js"></script>
	<script>
		var token1 = sessionStorage['token'];
		var method1 = "get_wallet_msg";
		$.ajax({
			type: 'POST',
			url: "http://www.rice.com/app/api/h5_access",
			contentType: "application/x-www-form-urlencoded; charset=utf-8",
			datatype: "JSON",
			data: {
				method: method1,
				token: token1
			},
			success: function (data) {
				var data1 = JSON.parse(data);
				console.log(data1);
				if (data1.status === 1) {
					$("#bankName").html(data1.data.data.bankName);
					var accountNo1 = data1.data.data.accountNo
					var yy = accountNo1.substr(accountNo1.length - 4);
					$("#accountNo").html("**** **** **** " + yy);
					sessionStorage['idCard'] = data1.data.data.idCard;
					sessionStorage['accountName'] = data1.data.data.accountName;
					$(".bank_logo").attr("src", data1.data.data.logo_url);
				} else if (Number(data1.status) == 2) {
					alert(data1.message);
					window.location.href = "login.html";
				} else {
					alert(data1.message);
				}
			}
		});
	</script>
</body>

</html>